/*
    用来定义 student 模型
 */

const mongoose = require("mongoose")

const Schema = mongoose.Schema

const stuSchema = new Schema({

    name: String,
    age: Number,
    gender: {
        type: String,
        default: "female"
    },
    address: String

})

// 定义模型
const stuModel = mongoose.model("student", stuSchema)

// exports.model = stuModel;
module.exports = stuModel